{% macro gen_table(partics) %}
    <table class="table table-bordered table-hover table-condensed table-striped">

        <thead>
        <tr>
            <th>项目ID</th>
            <th>项目信息</th>
            <th>竞标人昵称</th>
            <th>竞标人电话</th>
            <th>竞标点数</th>
            <th>抢单状态</th>
            <th>抢单时间</th>
            <th>中标时间</th>
            <th>通话时长</th>
            {#                <th>操作</th>#}
        </tr>
        </thead>
        <tbody>
        {% for partic in partics %}
            <tr id="feedback-info">

                <td>
                    <a href="{{ url_for('op_bp.demand_info', demand_id=partic.demand_id) }}"
                       target="_blank">
                        {{ partic.demand_id }}
                    </a>
                </td>
            <!--# FIXME by ld_wu 2017-12-11 需优化数据库访问次数问题 -->
                <td>
                    {% if partic.demand %}
                        {{ partic.demand.city }}--
                        {{ partic.demand.cate_display }}--
                        {{ partic.demand.type_display }}
                        （{{ partic.demand.surr_display }}、
                        {{ partic.demand.color_display }}、
                        {{ partic.demand.size }}m³）
                    {% endif %}
                </td>

                <td>
                    {% if partic.owner %}
                        <a href="{{ url_for('op_bp.user_info', user_id=partic.owner.id) }}"
                           target="_blank">{{ partic.owner.nickname }}</a>
                    {% endif %}
                </td>

                <td>
                    {% if partic.owner %}
                        {{ partic.owner.mobile | encrypt }}
                    {% endif %}
                </td>

                <td>{{ partic.offer }}</td>
                <td>{{ partic.status_display }}</td>
                <td>{{ partic.offer_at_datetime or '' }}</td>
                <td>{{ partic.bid_win_at_display or '' }}</td>
                <td>{{ partic.contact_seconds }}</td>

                {#                    <td class="feedback-btn-group">#}
                {#                        {% if partic.feedback_status == 3 %}#}
                {#                            <a class="btn-group btn btn-success feedback-btn"#}
                {#                               data-supplier_id="{{ partic.supplier_id }}"#}
                {#                               data-demand_id="{{ partic.demand_id }}"#}
                {#                               data-feedback_status="2"#}
                {#                            >通过#}
                {#                            </a>#}
                {#                            <a class="btn-group btn btn-danger feedback-btn"#}
                {#                               data-supplier_id="{{ partic.supplier_id }}"#}
                {#                               data-demand_id="{{ partic.demand_id }}"#}
                {#                               data-feedback_status="1"#}
                {#                            >驳回#}
                {#                            </a>#}
                {#                        {% endif %}#}
                {#                    </td>#}
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endmacro %}
